package net.betou.cms.manager.assist;

import java.util.List;

import net.betou.cms.entity.assist.CmsComment;
import net.betou.cms.entity.assist.CmsCommentExt;
import net.betou.common.page.Pagination;


public interface CmsCommentMng {
	
	/**
	 * 查询评论
	 * @param queryContentTitle		文档标题
	 * @param queryCommentIp		评论IP
	 * @param checked						是否审核
	 * @param recommend					是否推荐
	 * @param siteId							站点ID
	 * @param order							排序字段
	 * @param cacheable					是否缓存
	 * @param ups								顶的次数
	 * @param pageNo						页数
	 * @param pageSize						每页显示多少条
	 * @return
	 */
	public Pagination getPage( String queryContentTitle, 
												   String queryCommentIp, 
												   Boolean checked, 
												   Boolean recommend,  
												   Integer siteId, 
												   Integer order, 
												   Short ups,
												   int pageNo,
												   int pageSize);
	
	
	public Pagination getPage(Integer siteId, Integer contentId,
			Integer greaterThen, Boolean checked, boolean recommend,
			boolean desc, int pageNo, int pageSize);

	public Pagination getPageForTag(Integer siteId, Integer contentId,
			Integer greaterThen, Boolean checked, boolean recommend,
			boolean desc, int pageNo, int pageSize);
	
	/**
	 * 
	 * @param siteId
	 * @param contentId
	 * @param toUserId 写评论的用户
	 * @param fromUserId 投稿的信息接收到的相关评论
	 * @param greaterThen
	 * @param checked
	 * @param recommend
	 * @param desc
	 * @param pageNo
	 * @param pageSize
	 * @return
	 */
	public Pagination getPageForMember(Integer siteId, Integer contentId,Integer toUserId,Integer fromUserId,
			Integer greaterThen, Boolean checked, Boolean recommend,
			boolean desc, int pageNo, int pageSize);
	/**
	 * 
	 * @param siteId
	 * @param userId 发表信息用户id
	 * @param commentUserId 评论用户id
	 * @param ip  评论来访ip
	 * @return
	 */
	public List<CmsComment> getListForDel(Integer siteId, Integer userId,Integer commentUserId,String ip);

	public List<CmsComment> getListForTag(Integer siteId, Integer contentId,
			Integer greaterThen, Boolean checked, boolean recommend,
			boolean desc, int count);

	public CmsComment findById(Integer id);

	public CmsComment comment(String text, String ip, Integer contentId,
			Integer siteId, Integer userId, boolean checked, boolean recommend);

	public CmsComment update(CmsComment bean, CmsCommentExt ext);

	public int deleteByContentId(Integer contentId);

	public CmsComment deleteById(Integer id);

	public CmsComment[] deleteByIds(Integer[] ids);

	public void ups(Integer id);

	public void downs(Integer id);
}